from google.appengine.ext import ndb
from google.appengine.api import memcache
import json
class User(ndb.Model):
    _use_cache = False
    _use_memcache = False
    data = ndb.StringProperty()
user = User(id='current_user', data='foo'); user.put()
memcache.set('current_user', json.dumps(user.to_dict()))

# in another request
user = memcache.get('current_user')
if not user: user = User.get_by_id('current_user').to_dict()
print user
